package com.curd.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import com.curd.eo.MemberEo;
import com.curd.service.IMemberService;
import com.curd.utils.IdGen;

@RestController
@RequestMapping(value = "/member")
public class MemberController {
	
	@Autowired
	private IMemberService memberService;
	
	@RequestMapping(value = "/detail/get",method = RequestMethod.GET)
	public MemberEo getMemberInfo(String id){
		System.out.println("login in .............");
		return memberService.getById(id);
	}
	
	@RequestMapping(value = "/save",method = RequestMethod.POST)
	public int save(MemberEo member){
		member.setId(IdGen.creatUUID());
		return memberService.insertSelective(member);
	}

}
